<?php
$parentCaption = BUtils::T('feedback_lbl');
$this->pageTitle = $parentCaption;

$this->breadcrumbs = array(
	$parentCaption
);
?>
<div class="page-header position-relative">
	<h1>
		<?php echo $parentCaption; ?>
	</h1>
</div><!--/.page-header-->

<div class="row-fluid">
	<!-- Message -->
	<div class="alert alert-block alert-success">
		<button type="button" class="close" data-dismiss="alert">
			<i class="icon-remove"></i>
		</button>
		<i class="icon-info-sign green"></i>
		<?php echo BUtils::T('feedback_eg'); ?>
	</div>
	
	<div class="space-6"></div>
	
	<div class="row-fluid">
		<div class="span6 offset3">
<?php if (Yii::app()->user->hasFlash('success')) { ?>
<div class="well well-large well-success">
	<i class="icon-ok"></i>
	<?php echo Yii::app()->user->getFlash('success'); ?>
</div>
<?php } else {
$form = $this->beginWidget('CActiveForm', array(
	'id'=>'feedback-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
));
?>
	<div class="control-group">
		<?php echo $form->labelEx($model, 'email', array('class'=>'control-label')); ?>
		<div class="controls">
			<div class="input-icon input-icon-right">
				<?php echo $form->textField($model,'email',array('class'=>'span12', 'value'=>Yii::app()->user->email)); ?>
				<i class="icon-envelope"></i>
			</div>
			<span class="help-inline"><?php echo $form->error($model,'email'); ?></span>
		</div>
	</div>
	<div class="control-group">
		<div class="controls">
			<?php echo $form->textArea($model,'content',array('class'=>'autosize-transition span12','placeHolder'=>BUtils::T('feedback_eg'))); ?>
			<span class="help-inline"><?php echo $form->error($model,'content'); ?></span>
		</div>
	</div>
	<div class="form-actions">
		<?php echo CHtml::submitButton(BUtils::T('confirm_btn'), array('class' => 'btn btn-primary')); ?>
		<?php echo CHtml::button(BUtils::T('cancel_btn'), array('class'=>'btn', 'onclick'=>'history.go(-1);', 'confirm'=>BUtils::T('cancel_btn_msg'))); ?>
	</div>
<?php
	$this->endWidget();
}
?>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function() {
	$('textarea[class*=autosize]').autosize({append: "\n"});
});
</script>